package com.example.librarymanagement.dto.periodical;

import com.example.librarymanagement.entity.Periodical;
import com.example.librarymanagement.util.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author fgba
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Accessors(chain = true)
public class PeriodicalIssueAddDto extends BaseDto<Periodical> {

    @ApiModelProperty(value = "国际标准书号")
    @NotBlank(message = "issn码不能为空")
    private String issn;

    @ApiModelProperty(value = "期数")
    @NotBlank(message = "期数不能为空")
    private String issue;

    @ApiModelProperty(value = "存入数量")
    @NotNull(message = "存入数量不为空")
    private Integer total;

    @ApiModelProperty(value = "是否修改总期数")
    private Boolean updTotalIssue;
}
